set more off

*** states ***

#delimit;

shp2dta 
	using "gis/cb_2013_us_state_500k.shp"
	,
		database("gis/states") 
		coordinates("dataset_coords") 
		genid(_id) 
		gencentroids(c)
		replace
		;
		
#delimit cr

use "gis/states", clear

rename NAME statename

replace statename = lower(statename)
rename STATEFP fipsstate
destring fipsstate, replace

save "gis/states", replace

*** counties ***

use "gis/counties_src", clear
rename geofips fips
rename x_c longitude
rename y_c latitude
keep fips lon lat
save "gis/counties", replace

*** borders with distance ***

use "gis/borders with two dimensional distance", clear
rename geofips fips
save "gis/borderswithtwodimensionaldistance", replace
